﻿using System.ComponentModel.DataAnnotations;

namespace RndMaterialDisposalService.Models
{
    public class TemporaryProcessDocumentReportFormModel
    {
        [Key]
        [Ganss.Excel.Ignore]
        public Guid Key { get; set; }
        [Ganss.Excel.Ignore]
        public string ProcInstId { get; set; }
        [Ganss.Excel.Column(1, "当前处理人")]
        public string ApplicantName { get; set; }
        [Ganss.Excel.Ignore]
        public DateTime? ApplicantTime { get; set; }
        [Ganss.Excel.Column(2, "提交时间")]
        public string? DcApplicantTime => ApplicantTime?.ToString("yyyy-MM-dd");
        [Ganss.Excel.Column(3, "申请人")]
        public string CreateName { get; set; }
        [Ganss.Excel.Column(4, "申请部门")]
        public string AffiliationDepartment { get; set; }
        [Ganss.Excel.Ignore]
        //所属部门编码
        public string AffiliationDepartmentID { get; set; }
        [Ganss.Excel.Column(5, "单号")]
        public string ApplicationNumber { get; set; }
        [Ganss.Excel.Column(6, "产品类别")]
        public string ProductType { get; set; }
        [Ganss.Excel.Ignore]
        //产品类别编码
        public string ProductTypeID { get; set; }
        [Ganss.Excel.Column(7, "附加临时工艺文件名称")]
        public string TemporaryFileName { get; set; }
        [Ganss.Excel.Column(8, "更改部位")]
        public string ChangeParts { get; set; }
        [Ganss.Excel.Ignore]
        //更改部位编号
        public string ChangePartsID { get; set; }
        [Ganss.Excel.Column(9, "Item")]
        public string Item { get; set; }
        [Ganss.Excel.Column(10, "状态")]
        public string Status { get; set; }
        [Ganss.Excel.Ignore]
        public bool? Effectiveness { get; set; }
        [Ganss.Excel.Column(11, "有效性")]
        public string? EffectivenessStr => Effectiveness == true ? "有效" : "无效";
        [Ganss.Excel.Ignore]
        public DateTime? TakeEffectTime { get; set; }
        [Ganss.Excel.Column(12, "生效日期")]
        public string? DcTakeEffectTime => TakeEffectTime?.ToString("yyyy-MM-dd");
        [Ganss.Excel.Ignore]
        public DateTime? LoseEfficacyTime { get; set; }
        [Ganss.Excel.Column(13, "失效日期")]
        public string? DcLoseEfficacyTime => LoseEfficacyTime?.ToString("yyyy-MM-dd");
        [Ganss.Excel.Column(14, "流程状态")]
        public string CurrentStatus { get; set; }
    }
}
